<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .box1 {
            width: 200px;
            height: 200px;
            background-color: orange;
            /* 设置哪个属性需要过渡效果 */
            /* transition-property: height, background-color; */

            /* 让所有能过渡的属性都进行过渡。能用数字或百分比表示出来的属性，就能过渡 */
            transition-property: all;

            /* 设置过渡的时间 */
            transition-duration: 0.5s, 10s;
        }

        .box1:hover {
            width: 200;
            height: 400px;
            background-color: red;
        }
    </style>
</head>
<body>

    <div class="box1"></div>
    
</body>
</html>